#pragma once

#include "BaseOrder.h"

namespace mdtx::punch
{
    template <class QT>
    class BaseTracker
    {
    public:
        using order_type = BaseOrder<QT>;
        using quant_type = typename QT::quant_type;

        /**
         * @brief Callback on order submissions
         *
         * @param order order
         */
        virtual void on_submit(const order_type &order) = 0;

        /**
         * @brief Callback on price matches
         *
         * @param order order
         * @param price matched price
         * @param quant matched quantity
         * @param tnvr matched turnover
         * @param is_aggr is order aggressor
         */
        virtual void on_match(const order_type &order, quant_type price, quant_type quant, quant_type tnvr, bool is_aggr) = 0;

        /**
         * @brief Callback on order enqueue
         *
         * @param order order
         */
        virtual void on_queue(const order_type &order) = 0;

        /**
         * @brief Callback on order cancellation
         *
         * @param order order
         * @param quant cancelled quantity
         */
        virtual void on_cancel(const order_type &order, quant_type quant) = 0;
    };
}
